<include file="Inc/header" />
<script type="text/javascript">
    function submitFun(act)
    {
        form1.action.value = act;
        form1.submit();
    }
</script>
<style>
    input{height: 20px;width: 30px;}
</style>

        <!--span-- style="float:right;width:300px;margin-top:-20px;"><a href="/Public/Uploads/yycmb.zip">营养餐导入模板下载</a>
            <form action="{:U('Admin/Stu/upload')}" method="post" enctype="multipart/form-data">
                <input type="file" name="files"/>
                <input type="submit" value="营养餐导入"/>
            </form>
        </span-->
        <!--span-- style="float:right;width:300px;margin-top:-20px;"><a href="/Public/Uploads/yycmb.zip"></a>
            <form action="{:U('Admin/Stu/zupload')}" method="post" enctype="multipart/form-data">
                <input type="file" name="files"/>
                <input type="submit" value="Z导入"/>
            </form>
        </span-->
        <span style="float:right;width:300px;margin-top:-20px;"><a href="/Public/Uploads/other.zip">学籍其它成员导入</a>
            <form action="{:U('Admin/Stu/xueji_system')}" method="post" enctype="multipart/form-data">
                <input type="file" name="files" style="width: 120px;height: 30px;"/>
                <input type="submit" value="学籍其它成员导入" style="width: 120px;height: 30px;"/>
            </form>
        </span>
        <span style="float:right;width:300px;margin-top:-20px;"><a href="/Public/Uploads/xuejihao.zip">纯学籍号导入模板下载</a>
            <form action="{:U('Admin/Stu/xuejihao')}" method="post" enctype="multipart/form-data">
                <input type="file" name="files" style="width: 120px;height: 30px;"/>
                <input type="submit" value="纯学籍号导入" style="width: 120px;height: 30px;"/>
            </form>
        </span>
        <div class="content-box">
            <!-- Start Content Box -->
            <div class="content-box-header">
                <form name='form1' action="{:U('Admin/Stu/showAll')}" method="get">
                    <ul class="content-box-tabs">
                        <li><input class="ui-textbox search form-control" name="kw" value="{$_REQUEST['kw']}"
                                       placeholder="姓名/身份证/学籍号/家长电话"/></li>
                        <li><select name="grade" class="ui-textbox search form-control">
                            <option value="-1">请选择年级</option>
                            <volist name="sh_grade_array" id="class">
                                <option value="{$class['id']}"
                                <if condition="$class['id'] eq $_REQUEST['grade'] "> selected='selected'</if>
                                >{$class['name']}</option>
                            </volist>
                        </select></li>
                        <li><select name="class" class="ui-textbox search form-control">
                            <option value="-1">请选择班级</option>
                            <volist name="sh_class_array" id="class">
                                <option value="{$class['id']}"
                                <if condition="$class['id'] eq $_REQUEST['class'] "> selected='selected'</if>
                                >{$class['name']}</option>
                            </volist>
                        </select></li>
                        <li><select name="poor" class="ui-textbox search form-control">
                            <option value="-1"
                            <if condition="$_REQUEST['poor'] eq '-1' "> selected='selected'</if>
                            >全部（含贫困户）</option>
                            <option value="1"
                            <if condition="$_REQUEST['poor'] eq 1 "> selected='selected'</if>
                            >是</option>
                            <option value="0"
                            <if condition="$_REQUEST['poor'] eq 0 "> selected='selected'</if>
                            >否</option>

                        </select></li>
                        <li><select name="liushou" class="ui-textbox search form-control">
                            <option value="-1"
                            <if condition="$_REQUEST['liushou'] eq '-1' "> selected='selected'</if>
                            >全部（留守）</option>
                            <option value="1"
                            <if condition="$_REQUEST['liushou'] eq 1 "> selected='selected'</if>
                            >是</option>
                            <option value="0"
                            <if condition="$_REQUEST['liushou'] eq 0 "> selected='selected'</if>
                            >否</option>

                        </select></li>
                        <li><select name="term" class="ui-textbox search form-control">
                            <option value="-1"
                            <if condition="$_REQUEST['term'] eq '-1' "> selected='selected'</if>
                            >请选择学期</option>

                            <volist name="term" id="row">
                                <option value="{$row}"
                                <if condition="$row eq $_REQUEST['term'] "> selected='selected'</if>
                                >{$row}</option>
                            </volist>



                        </select></li>
                        <li><input type="hidden" id='actioning' name="action" value="cha"/>
                            <button rel="orange" type="button"
                                    onclick="submitFun('cha');" class="add_goods_type ui-textbox search form-control">查询
                            </button>
                            <button rel="orange" type="button"
                                    onclick="submitFun('excel');" class="add_goods_type ui-textbox search form-control">导出数据
                            </button>
                            </td>
                        </li>
                    </ul>
                    <div class="clear"></div>

            </div>
            <!-- End .content-box-header -->
            <div class="content-box-content">
                <div class="tab-content default-tab" id="tab1">

                    <table>
                        <thead>
                        <tr>
                            <td colspan="2">导出字段：</td>
                            <td colspan="11">
                                <input type="checkbox" name='fields[]' value="t.name">姓名
                                <input type="checkbox" name='fields[]' value="t.sex">性别
                                <input type="checkbox" name='fields[]' value="t.ID_number">身份证号
                                <input type="checkbox" name='fields[]' value="t.XJ_number">学籍号
                                <input type="checkbox" name='fields[]' value="g.name as gradename">年级
                                <input type="checkbox" name='fields[]' value="c.name as classname">班级
                                <input type="checkbox" name='fields[]' value="t.jiguan">籍贯
                                <input type="checkbox" name='fields[]' value="t.town">乡镇
                                <input type="checkbox" name='fields[]' value="t.address">住址<br>
                                <input type="checkbox" name='fields[]' value="t.laiyuan">生源地
                                <input type="checkbox" name='fields[]' value="t.father_name">家长姓名
                                <input type="checkbox" name='fields[]' value="t.father_ID_number">家长身份证号
                                <input type="checkbox" name='fields[]' value="t.father_tel">联系电话
                                <input type="checkbox" name='fields[]' value="t.liushou">留守儿童
                                <input type="checkbox" name='fields[]' value="t.poor">是否贫困户
                                </form>
                            </td>
                        </tr>
                        <tr>
                            <!--th>
                                <input class="check-all" type="checkbox"/>
                            </th-->
                            <th>序号</th>
                            <th>姓名</th>
                            <th>性别</th>
                            <th>身份证号/学籍号</th>
                            <th>班级</th>
                            <th>年级</th>
                            <th>籍贯</th>
                            <th>家长</th>
                            <th>电话</th>
                            <th>注册时间</th>
                            <th>贫困户</th>
                            <th>操作</th>
                        </tr>
                        </thead>

                        <tfoot>
                        <tr>
                            <td colspan="3">
                                <span style="float:right;">总数：{$count}</span>
                            </td>
                            <td colspan="10">
                                <div class="pagination">{$pageControl}</div>
                                <!-- End .pagination -->
                                <div class="clear"></div>
                            </td>
                        </tr>
                        </tfoot>
                        <tbody>
                        <volist name="stus" id="user">
                            <tr>

                                <!--td>
                                    <input type="checkbox"/>
                                </--td-->
                                <td>{$user['ids']}</td>
                                <td>{$user['name']}</td>
                                <td>{$user['sex']}</td>
                                <td>{$user['id_number']}<br>{$user['xj_number']}</td>
                                <td>{$user['classname']}</td>
                                <td>{$user['gradename']}</td>
                                <td>{$user['jiguan']}</td>
                                <td>{$user['father_name']}</td>
                                <td>{$user['father_tel']}</td>
                                <td>{$user['otime']}</td>
                                <td>
                                    <if condition="$user['poor'] eq 1">是</if>
                                </td>
                                <td>
                                    <!-- Icons -->
                                    <a href="{:U('Admin/Stu/showUpdate',array('id'=>$user['id']))}" title="Edit">
                                        <img src="__PUBLIC__/images/icons/pencil.png" alt="Edit"/></a>
                                    <!--a-- href="{:U('Admin/Stu/del',array('id'=>$user['id']))}" title="Delete"><img
                                            src="__PUBLIC__/images/icons/cross.png" alt="Delete"/></a-->
                                </td>

                            </tr>
                        </volist>

                        </tbody>
                    </table>
                </div>
                <!-- End #tab1 -->

            </div>
            <!-- End .content-box-content -->
        </div>

        <include file="Inc/footer"/>
    </div>